import 'package:flutter/material.dart';

class ButtonWidget extends StatelessWidget {
  const ButtonWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("基础组件——按钮"),
        centerTitle: true,
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
      ),
      body: Column(
        children: <Widget>[
          TextButton(
            onPressed: () => {
              debugPrint("按下了 Text Button ")
            },
            style: const ButtonStyle(
              alignment: Alignment.center
            ),
            child: const Text("Text Button"),
          ),
          OutlinedButton(
              onPressed: () => {},
              child: const Text("Outline Button")
          ),
          FloatingActionButton(
              onPressed: () => {},
              foregroundColor: Colors.white,
              backgroundColor: Colors.pink,
              child: const Text("Float Button"),
          )
        ],
      ),
    );
  }

}